Thanks Loomi for your post, I have been scratching my head for the last few days on how to drive the SITE rcs-k08 devices.
As you mention, the receiver must be trained, but you don't describe how to do it. It turn out that the 'on' command with an arbitrary ID must be send during at least two seconds while the receiver is in learning mode (i.e. one-second interval blinking led), usually when you plug it in.
All that is needed with your code is to increase the number of sends in your for() loop in hs1527tram().
To try it out, I have copy-pasted the function as so:
static void hs1527train(long devicenr, int channel) {
for(int a = 100; a > 0; a--) { // minimal 3 successive trams are required
ookPulse(pulseLength0, pulseLengthS); //sync
for(int b = 19; b > -1; b--)
hs1527bit((devicenr >> b) & 0b1); //device nr
hs1527bit(0); //on - off
for(int b = 2; b > -1; b--)
hs1527bit((channel >> b) & 0b1); //channel
}
}
You can call this function in setup(), passing ID code and channel. Or as I have done, add it to the RF12Demo for interactive control.
And a last comment, I was experiencing 'misfires', i.e. commands being ignored by the receiver. I increased the pulseLength defines, which solved this problem:
//min 270 - max 650 -> smaller intervall = less power usage therfore
#define pulseLength0 400
#define pulseLength1 1200 //pulseLength 3
#define pulseLengthS 12400 //pulseLength 31